let title = "ES6从入门到学会";
let price = 25;
let publish = "小马出版社";

let book = {
    title, price, publish,
   
    toString(){
        console.log(`<<${this.title}>> 是 ${price}元。`);
    }
};
book['lang'] = "简体中文";

console.log(book);
book.toString();

/*
 { title: 'ES6从入门到学会',
  price: 25,
  publish: '小马出版社',
  toString: [Function: toString],
  lang: '简体中文' }
<<ES6从入门到学会>> 是 25元。
 */